Image reading apparatus with detection of abnormal pixels

ABSTRACT

An original image is read as an aggregate of a plurality of pixels in which adjacent pixels have different colors (R, G, and B) in a main scanning direction and in a sub-scanning direction, and the read pixels of the respective colors are stored in a line memory in association with information on relative positions of the pixels with respect to another pixel. Then, the stored pixels are sorted so that pixels having the same color are adjacent to each other, and an abnormal pixel (dust) not present in the original image is detected based on the state of the sorted pixels. With this, the dust not present in the original image is detected without increasing the cost, and the dust is corrected without forming a conspicuous trace of correction.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an image reading apparatus configuredto effectively detect an abnormal pixel that is not present in an imageof an object when the image is read, and to a method for processing animage read by the image reading apparatus.

Description of the Related Art

As an image reading apparatus to be used in a copying machine or thelike, there is known an image reading apparatus configured to perform“flow-reading”. In the flow-reading, while originals are conveyed one byone onto an original table glass, each original is exposed with lightemitted from a light source fixed at a predetermined position for imagereading. At the time of the flow-reading, when foreign matter, forexample, dust adheres to the original table glass, a streak image may beformed in the read image. In order to solve such a problem, hitherto,there have been proposed a technology of automatically detecting dustadhesion when dust has adhered onto the original table glass, to therebyurge a user to clean the original table glass, and a technology ofperforming correction through image processing.

For example, an apparatus disclosed in Japanese Patent ApplicationLaid-open No. 2004-328200 is configured to convert the read image intobinary data, and add the binary data for each line in a sub-scanningdirection, to thereby detect a black streak when the addition result isequal to or more than a predetermined value. When the black streak isdetected, the image is corrected.

In the apparatus disclosed in Japanese Patent Application Laid-open No.2004-328200, when the read original has a vertical line like a ruledline extending in the sub-scanning direction, the ruled line may befalsely detected as a black streak.

The present invention has a primary object to provide an image readingmethod capable of detecting an abnormal pixel with high accuracy.

SUMMARY OF THE INVENTION

According to one embodiment of the present invention, there is providedan image reading apparatus, comprising: a sensor having first and secondline sensors and configured to read an image of an object, the firstline sensor having a first light receiving elements and a second lightreceiving elements being arranged in a first direction, the first lightreceiving elements configured to receive light of a first color and thesecond light receiving elements configured to receive light of a secondcolor that is different from the first color, the second line sensorhaving a third light receiving elements and a fourth light receivingelements being arranged in the first direction, the third lightreceiving elements configured to receive light of the first color andthe fourth light receiving elements configured to receive light of thesecond color, and the first line sensor and the second line sensor beingarranged at a predetermined interval in a second direction orthogonal tothe first direction; and a detector configured to detect an abnormalpixel of the first color based on first image data of the firstreceiving elements and third image data of the third receiving elements,and to detect an abnormal pixel of the second color based on secondimage data of the second receiving elements and fourth image data of thefourth receiving elements.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram for illustrating a configuration example of an imageforming apparatus according to a first embodiment of the presentinvention.

FIG. 2 is a diagram for illustrating a configuration example of anoriginal reading unit included in the image forming apparatus.

FIG. 3 is an explanatory diagram of arrangement structure of lightreceiving elements in a line sensor.

FIG. 4 is a block diagram of a control system of an image readingapparatus according to the first embodiment.

FIG. 5A and FIG. 5B are explanatory diagrams for illustrating a readingstate of image data from the line memory.

FIG. 6 is an explanatory diagram of a parallel-line original.

FIG. 7A, FIG. 7B, FIG. 7C, FIG. 7D, and FIG. 7E are graphs for showingrelationships between MTF characteristics and results of reading theparallel-line original.

FIG. 8A and FIG. 8B are explanatory diagrams for illustrating a dustadhering state.

FIG. 9A is a graph for showing reading results obtained before sorting,and FIG. 9B is a graph for showing reading results obtained after thesorting.

FIG. 10A and FIG. 10B are explanatory diagrams for illustrating a stateof reading a line present in the original.

FIG. 11A is a graph for showing reading results obtained before sorting,and FIG. 11B is a graph for showing reading results obtained after thesorting.

FIG. 12A is a graph for showing results of reading a cyan line, whichare obtained before sorting, and FIG. 12B is a graph for showing resultsof reading the cyan line, which are obtained after the sorting.

FIG. 13 is a detailed block diagram of a dust detection circuit.

FIG. 14A, FIG. 14B, FIG. 14C, and FIG. 14D are diagrams for showingresults of reading a line in the original and a line caused by dust.

FIG. 15 is an explanatory graph for showing reading levels obtainedbefore and after dust correction.

FIG. 16 is an explanatory procedure diagram of original readingprocessing.

FIG. 17 is an explanatory diagram of an imaging state of widely imageddust.

FIG. 18 is a block diagram of a control system of an image readingapparatus according to a second embodiment of the present invention.

FIG. 19A, FIG. 19B, FIG. 19C, and FIG. 19D are explanatory diagrams forillustrating operations of a flag expansion circuit and a line memory.

FIG. 20A is an explanatory diagram of a detection state of dust presentacross one line, and FIG. 20B is an explanatory diagram of a detectionstate of dust present across two lines.

FIG. 21 is an explanatory diagram for illustrating processing ofsubjecting an edge part of a vertical line to linear interpolation foreach color.

FIG. 22 is an explanatory diagram for illustrating processing ofsubjecting the edge part of the vertical line to linear interpolationfor all colors at the same time.

FIG. 23 is an explanatory diagram for illustrating a state of subjectingdecomposed dust flags to OR processing among colors.

FIG. 24 is a block diagram of a control system of an image readingapparatus according to a third embodiment of the present invention.

FIG. 25 is an internal block diagram of a dust detection circuit of theimage reading apparatus according to the third embodiment.

FIG. 26A, FIG. 26B, FIG. 26C, FIG. 26D, FIG. 26E, FIG. 26F, FIG. 26G,FIG. 26H, FIG. 26I, and FIG. 26J are explanatory diagrams forillustrating a dust detecting step of the image reading apparatusaccording to the third embodiment.

FIG. 27 is an internal block diagram of a flag synthesis circuit.

FIG. 28A and FIG. 28B are time charts for illustrating operationexamples of the flag synthesis circuit.

FIG. 29 is a time chart for illustrating an operation example of flagdetermination.

DESCRIPTION OF THE EMBODIMENTS

Now, embodiments of the present invention are described in detail.

First Embodiment

FIG. 1 is an illustration of a digital color multifunction peripheral,which is an example of an image forming apparatus 111 including an imagereading apparatus 100 according to a first embodiment of the presentinvention. The image forming apparatus 111 includes the image readingapparatus 100 and an image forming apparatus main body 105.

The image forming apparatus main body 105 includes an image formingportion 110 configured to form an image by employing a knownelectrophotographic system. The image forming portion 110 includes aphotosensitive member, an exposure device, a developing device, atransfer device, and a fixing device. The exposure device is configuredto form an electrostatic latent image on the photosensitive member basedon image information acquired by the image reading apparatus 100 servingas an image input portion. The developing device is configured todevelop the electrostatic latent image into a developer image usingtoner. The transfer device is configured to transfer the developer imageonto a conveyed recording medium. The fixing device is configured to fixthe developer image formed on the recording medium onto the recordingmedium.

The image reading apparatus 100 includes an original tray 101 on whichan original 102, which is an example of an object, is to be placed, andoriginal reading units 103 and 106. The original reading units 103 and106 are configured to covey the original 102 placed on the original tray101 to an original table glass 112 by an original conveyance motor, tothereby read the original 102 as an original image. An originalbackground plate is arranged on the back side of the original 102 on theoriginal table glass 112. After the reading of the original image by theoriginal reading units 103 and 106 ends, the image reading apparatus 100delivers the original 102 to a sheet delivery tray 104. When only oneside of the original is to be read, the image is read using the originalreading unit 103, and when both sides of the original are to be read,the image is read using the original reading units 103 and 106. Theoriginal reading units 103 and 106 have the same configuration, andhence the original reading unit 106 is described as an example in thefollowing.

FIG. 2 is a schematic diagram for illustrating a configuration exampleof the original reading unit 106. The original reading unit 106 includesa light source 201, a lens 202, a line sensor 203, and mirrors 204, 205,206, and 207. The light source 201 is arranged at a predeterminedposition for radiating light toward the original 102 that passes throughan original reading position 107. The mirrors 204, 205, 206, and 207 areconfigured to guide the light reflected from the original 102 toward thelens 202 and the line sensor 203. The line sensor 203 is configured tophotoelectrically convert, using each of a plurality of light receivingelements, the light reflected from the original 102 and guided by thelens 202, to thereby output a signal corresponding to the intensity ofthe reflected light. The lens 202 and the mirrors 204, 205, 206, and 207construct an optical system of the original reading unit 106. Theresolution of the optical system is lower than the resolution of theline sensor 203. The reason for this is described later.

Next, the line sensor 203 is described. The line sensor 203 is, forexample, a charge-coupled device (CCD) linear image sensor. In the linesensor 203, the plurality of light receiving elements configured toreceive the light reflected from the original 102 are arranged. Onelight receiving element corresponds to one pixel. The width of one lightreceiving element corresponds to a one-pixel width. For example, athree-pixel width represents a width corresponding to three lightreceiving elements. Regarding pixels referred to when the image of theoriginal 102 is described, an image read by a one-pixel light receivingelement of the line sensor 203 is described as an image of one pixel(image having a one-pixel width). The light receiving elements includefirst light receiving elements configured to detect red light (firstcolor: R), second light receiving elements configured to detect greenlight (second color: G), and third light receiving elements configuredto detect blue light (third color: B). The respective light receivingelements for R, G, and B are periodically arranged in a predetermineddirection for each one-pixel width. With this, a light receiving elementrow in which R→G→B is repeated in the predetermined direction is formed.The line sensor 203 is obtained by arranging a plurality of such lightreceiving element rows. A pixel corresponding to the light receivingelement configured to receive red light is herein called “R pixel”, apixel corresponding to the light receiving element configured to receivegreen light is herein called “G pixel”, and a pixel corresponding to thelight receiving element configured to receive blue light is hereincalled “B pixel”. Further, a row in a first direction, which is formedof the light receiving element row, is herein called “reading line”. Onelight receiving element row forms one reading line. In the line sensor203, a plurality of reading lines of light receiving element rows eachforming one reading line are arranged at predetermined intervals in asecond direction orthogonal to the first direction.

FIG. 3 is an explanatory diagram of an arrangement structure of thelight receiving elements in the line sensor 203. The line sensor 203 isconfigured to read 7,500 pixels in a main scanning direction that is thefirst direction, and three reading lines in a sub-scanning directionthat is the second direction orthogonal to the first direction. In thiscase, description is made assuming that the image is read at theresolution of 600 dots per inch (dpi) in the main scanning direction,but the resolution is merely an example. The main scanning direction isa direction in which the plurality of light receiving elements arearranged in one row, and is a direction corresponding to a widthdirection (direction orthogonal to a conveyance direction) of theoriginal when the original is read. The sub-scanning direction is adirection orthogonal to the main scanning direction, and is a directioncorresponding to the conveyance direction of the original when theoriginal is read.

The three reading lines of light receiving element rows are separatedfrom each other in the sub-scanning direction at predetermined pixelwidths (predetermined intervals), and are arranged so that a color of astarting end pixel of the period of R→G→B in a certain row differs fromthat in adjacent rows. In the example of FIG. 3, the reading lineinterval is one pixel. Therefore, the light receiving element rows arearranged at positions separated in the sub-scanning direction by twopixels between a reading line L1 and a reading line L2, and by fourpixels between the reading line L1 and a reading line L3. Further, thecolor of the starting end pixel of the reading line L1 is “R” (red), thecolor of the starting end pixel of the reading line L2 is B (blue),which is different by one pixel from R, and the color of the startingend pixel of the reading line L3 is G (green), which is different by onepixel from B. That is, in the main scanning direction, the colors of thepixels have a regularity of R→G→B→R→G→B→ . . . . As viewed in thesub-scanning direction, the reading line L1 and the reading line L2 havearrangements in which the above-mentioned regularity is shifted by onepixel in the main scanning direction. The reading line L1 and thereading line L3 have arrangements in which the above-mentionedregularity is shifted by two pixels in the main scanning direction.Therefore, in the line sensor 203, the respective light receivingelements for R, G, and B are arranged in a so-called staggered manner.That is, the first light receiving elements, the second light receivingelements, and the third light receiving elements are arranged so thatthe light receiving elements configured to receive light of the samecolor are prevented from being adjacent to each other. When the original102 is read, the line sensor 203 outputs results of detecting signals atpositions separated by the above-mentioned number of pixels.

Each of the light receiving elements of the reading lines L1, L2, and L3includes a light transmitting member 300 in which light of acorresponding wavelength (wavelength of red light in the case of R) isset as a peak transmission wavelength, and an optical semiconductorelement configured to output a signal having a level corresponding tothe intensity of light transmitted through the light transmitting member300. The light transmitting member 300 is a filter that transmits lightof a corresponding color (red color in the case of R), and the opticalsemiconductor element is, for example, a photodiode. The peaktransmission wavelength refers to a wavelength at which thetransmittance of the film is the maximum. In a case of an elementcapable of receiving light of a corresponding color by itself, the lighttransmitting member 300 is unnecessary.

FIG. 4 is a block diagram of a control system of the image readingapparatus according to the first embodiment. The image reading apparatusincludes a computer including a CPU 401 and a non-volatile memory 409 asmain components. The CPU 401 reads out and executes a computer programstored in the non-volatile memory 409 so that the computer havingcomponents illustrated in FIG. 1 is caused to function as the imagereading apparatus. Then, the CPU 401 executes a characteristic imagereading method. The CPU 401 also controls operations of the light source201, the line sensor 203, and an original conveyance motor 105 based oninstructions from a user, which are input to an operation portion 408,to thereby control reading of the image of the original 102.

The outline of the operation of the control system is as follows. TheCPU 401 controls the line sensor 203 to read an original image as anaggregate of a plurality of pixels in which adjacent pixels havedifferent colors in each of the main scanning direction and thesub-scanning direction. The pixels of respective colors in the linesensor 203 output signals corresponding to the intensities (amounts) oflight input to the respective pixels based on the light reflected fromthe original. This signal corresponds to information of a density ofeach color of the original image. The signals are analog signals, andhence are converted by an A/D conversion circuit 402 into image databeing digital signals. In this case, for the sake of convenience, theA/D conversion circuit 402 is assumed to have an 8-bit resolution, butthe resolution is exemplary. The CPU 401 stores the read image data ofeach color to a line memory 404, which corresponds to a predeterminedmemory, in association with information on a relative position betweenthe image data and another piece of image data for each light receivingelement row. The information on the relative position corresponds to anarrangement position of each light receiving element of the line sensor203. When the information on the relative position corresponds to anaddress of the line memory 404, the address is used. A data sortingcircuit 403 is a circuit serving as an example of sorting means, and isconfigured to sort the stored pieces of image data so that pixels havingthe same color are adjacent to each other and rows of same-color pixelsare obtained.

The states of the pieces of image data, which are stored in the linememory 404 and sorted by the data sorting circuit 403 to be read out,are illustrated in FIG. 5A and FIG. 5B. First, the pieces of image dataare stored in the line memory 404 in the order of the arrangement of thelight receiving elements corresponding to the respective reading linesof the line sensor 203. That is, as illustrated in FIG. 5A, pieces ofimage data of five reading lines L1, three reading lines L2, and onereading line L3 are stored in the line memory 404. This is because, at atime point at which the image reading of the reading line L3 is ended,reading for three reading lines is already ended in the reading line L2separated by two pixels, and reading for five reading lines is alreadyended in the reading line L1 separated by four pixels. At this timepoint, the respective pieces of image data of R, G, and B are mixed inone reading line and are stored in the line memory 404 under this state.

The reading line L1 and the reading line L2 are arranged so as to beseparated by two pixels in the sub-scanning direction, and the readingline L1 and the reading line L3 are arranged so as to be separated byfour pixels in the sub-scanning direction. Therefore, the image data ofthe reading line L2 acquired at a certain timing corresponds to a signalreceived at a position shifted by two pixels in the sub-scanningdirection with respect to the reading line L1. Similarly, the image dataof the reading line L3 corresponds to a signal received at a positionshifted by four pixels in the sub-scanning direction with respect to thereading line L1. Therefore, when sorting those pieces of image data foreach color of R, G, and B, the data sorting circuit 403 shifts thepieces of image data by the number of the shifted pixels to read out andstore the shifted pieces of image data. That is, the image data of thereading line L2 is shifted by two pixels in the sub-scanning directionto be read out and stored, and the image data of the reading line L3 isshifted by four pixels in the sub-scanning direction to be read out andstored. With this, the pieces of image data can be sorted inconsideration of the arrangement structure of the reading lines L1 toL3. In order to perform such sorting, the data sorting circuit 403 readsout and stores the pieces of image data stored in the line memory 404 inthe order illustrated in FIG. 5B. The storing may be performed throughoverwriting of the line memory 404, or through writing to a differentarea of the line memory 404.

In FIG. 5B, L represents a reading line number, and L=1 represents thereading line L1. Further, n represents a reading line coordinate of theline memory 404, n=0 represents the latest reading line coordinate inputfrom the A/D conversion circuit 402, and n=1 represents a reading linecoordinate one reading line before n=0. The same applies to n=2 andsubsequent reading line coordinates. Further, x corresponds to aposition (coordinate) of the light receiving element (of one pixel) ofthe line sensor 203 in the main scanning direction. In the firstembodiment, description is made assuming that x ranges from 0 to 7,499.

First, the reading line L1 is focused on. The data sorting circuit 403reads out “L=1, n=4, x=0”. After the read-out is finished, the imagedata of “L=1, n=3, x=0” is read out and this image data is written to“L=1, n=4, x=0”. Similar processing is performed for n=3, 2, and 1.After the image data of “L=1, n=0, x=0” is read out, and the image datais written to “L=1, n=1, x=0”, new image data is imported. That is,image data corresponding to the position in the main scanning directionof x=0 of the line sensor 203, which is newly transmitted from the A/Dconversion circuit 402, is written to “L=1, n=0, x=0”.

Such an operation is called a “first-in first-out (FIFO) operation”. Thedata sorting circuit 403 performs this FIFO operation for x=1, x=2, . .. x=7,499. After the FIFO operation for the reading line L1 is ended,the data sorting circuit 403 performs a similar FIFO operation also forthe reading lines L2 and L3. In this manner, the data sorting circuit403 sequentially forms the row of the image data sorted for each color.The image data row of the red color is called “R reading line”, theimage data row of the green color is called “G reading line”, and theimage data row of the blue color is called “B reading line”.

The pieces of image data sorted into the R reading line, the G readingline, and the B reading line by the data sorting circuit 403 are inputto a shading correction circuit 405. The shading correction circuit 405is a circuit configured to perform shading correction for correcting theinfluence of unevenness of the light amount of the light source 201 andthe influence of pixel sensitivity of the line sensor 203. The imagedata subjected to shading correction is input to a dust detectioncircuit 406.

The dust detection circuit 406 is configured to detect an abnormal pixelthat is not present in the original image, that is, dust, based onresults of detection of the light receiving elements configured toreceive light of the same color in different reading lines. In thisexample, the dust detection circuit 406 detects dust based on the stateof the pixels sorted by the data sorting circuit 403. For example, thedust detection circuit 406 detects dust by comparing digital values ofthe sorted pieces of image data of any one color or respective colors.Then, the dust detection circuit 406 determines whether or not thedetected dust has a predetermined pixel width or less in the mainscanning direction, to thereby enable execution of processing based onthe result of the determination. In this example, the dust detectioncircuit 406 generates a predetermined flag, that is, a “dust flag”,representing information such as the position and the size of thedetected dust, and transmits the dust flag to a dust correction circuit407 at a subsequent stage. The dust detection circuit 406 furthernotifies the CPU 401 of the detection of dust with an interruptionsignal.

The dust correction circuit 407 is a circuit serving as an example ofcorrection means, and is configured to perform dust correctionprocessing based on the dust flag transmitted from the dust detectioncircuit 406. Details of the dust correction processing are describedlater. The operation portion 408 is configured to display operationinstruction inputs from the user, such as a reading start instructionand designation of the reading original size, and messages from theimage reading apparatus side to the user.

Now, the reason why the resolution of the optical system (lens 202 andmirrors 204, 205, 206, and 207) of the original reading unit 106 is setto be lower than the resolution of the line sensor 203 is described indetail. For example, it is assumed that the original reading unit 106reads, using the line sensor 203, an original having white and blacklines (called “parallel lines”) repeated for each pixel in the mainscanning direction illustrated in FIG. (called “parallel-lineoriginal”). The main scanning direction is a direction horizontal toeach reading line of the line sensor 203, and the direction in which theparallel-line original is conveyed is the sub-scanning direction. Theabove-mentioned optical system of the original reading unit 106 has amodulation transfer function (MTF) characteristic as shown in FIG. 7C.MTF is one index for evaluating lens performance. How faithfully thecontrast of the object (in this case, the original) can be reproduced isexpressed by MTF as a spatial frequency characteristic in order to findout the imaging performance of the optical system. In FIG. 7C, thelateral axis represents a resolution, and the vertical axis represents aratio (0 to 1.0). In general, MTF represents different characteristicsin the main scanning direction and the sub-scanning direction due to thelens and the optical system, but for the sake of convenience ofdescription, it is here assumed that the same MTF characteristic isobtained in the main scanning direction and the sub-scanning direction.

The reading characteristics obtained when the parallel-line originalhaving a parallel-line period of 600 dpi is read by the line sensor 203are shown in FIG. 7A and FIG. 7B. FIG. 7A represents a readingcharacteristic obtained when the MTF is 1.0, which is an ideal value, inall resolutions, and FIG. 7B represents an actual MTF readingcharacteristic. In FIG. 7A and FIG. 7B, the lateral axis represents acoordinate in the main scanning direction, and the vertical axisrepresents an A/D-converted reading level (digital value: 0 to 255) ofthe line sensor 203. The reading level represents a whiter color asbeing closer to 255, and represents a blacker color as being closer to0. When the MTF is 1.0, which is an ideal value, in all resolutions, theparallel-line original is faithfully read as shown in FIG. 7A, but theoriginal reading unit 106 having the MTF characteristic as shown in FIG.7C does not have resolving power at 600 dpi. Therefore, the readinglevel obtained when the parallel-line original is actually read is asshown in FIG. 7B. That is, the white and black parallel lines are readas mixed gray due to so-called blurring.

In contrast, when the period of the parallel lines is 300 dpi, thereading characteristic is as shown in FIG. 7D in an ideal MTF, butreferring to FIG. 7C, the MTF is about 0.5, and hence a readingcharacteristic as shown in FIG. 7E is actually obtained. Also in thiscase, the reading level of the parallel lines is close to gray due tothe blurring, and the result of the reading level of one pixel isaffected by several adjacent pixels.

In the first embodiment, the dust detection circuit 406 detects dust byusing such a reading characteristic that the reading level of one pixelalso affects the adjacent pixels.

Next, the dust detection circuit 406 is described in detail. FIG. 8A isan illustration of a state in which dust adheres to the original readingunit 106. That is, dust 80 adheres at the reading position of anoriginal table glass 208. FIG. 8B is an illustration representing aposition of the line sensor 203 to which the position of the dust 80corresponds. In the example illustrated in FIG. 8B, the dust 80 ispresent at a position of the R pixel in the second period of the readingline L1. The reading results of the respective reading lines L1, L2, andL3 of the line sensor 203 at this time are shown in FIG. 9A. The dust 80adheres at the position of the R pixel in the second period of thereading line L1, but due to the reading characteristic of the originalreading unit 106 described above, the B pixel and the G pixel adjacentthereto are affected, and thus reading levels thereof are reduced. Thisstate continues while the dust 80 adheres at this position. FIG. 9B isan example of image data obtained by sorting the reading results of FIG.9A into the R reading line, the G reading line, and the B reading lineby the data sorting circuit 403. As shown in FIG. 9B, not only the Rreading line but also the G reading line and the B reading line arereduced in level by one pixel. Therefore, the presence of dust with thesize of one pixel can be detected in any reading line.

Next, results of reading a line present in the original, which is notdust, are described. For example, it is assumed that a line having aone-pixel width is present in the original as illustrated in FIG. 10A,and this line is read at a corresponding position of the line sensor 203illustrated in FIG. 10B. The reading results of the reading lines L1,L2, and L3 of the line sensor 203 at this time are shown in FIG. 11A.The line in the original is read by the line sensor 203 in the order ofthe reading line L1, the reading line L2, and the reading line L3. FIG.11B is a graph for showing a state in which the reading results read asshown in FIG. 11A are sorted into each color by the data sorting circuit403. As shown in FIG. 11A and FIG. 11B, in the case of the line presentin the original, the reading level is reduced in every reading line evenafter the sorting. That is, the reading level is reduced by threepixels.

This example is described assuming a line in which R, G, and B have thesame reading level, but the reading level may differ depending on thecolor. For example, when the line present in the original has a cyancolor, the reading results of the reading lines L1, L2, and L3 of theline sensor 203 when this line is read are as shown in FIG. 12A. Thelevel is reduced by one pixel in each reading line before the sorting isperformed by the data sorting circuit 403. This is because, although theline present in the original is one pixel, as described above, theinfluence of this pixel appears also in pixels adjacent thereto due tothe reading characteristic of the original reading unit 106. That is,the R pixel whose level is reduced in the reading line L2 is adjacent tothe line read in the reading line L1, and hence blurring is caused dueto the reading characteristic of the original reading unit 106, whichappears as level reduction. The same applies to the level reduction ofthe R pixel in the reading line L3.

A state in which sorting is performed by the data sorting circuit 403when this cyan line is read is shown in FIG. 12B. In FIG. 12B, in orderfrom the top, the R reading line, the G reading line, and the B readingline are shown. As shown in FIG. 12B, after the sorting, the level isreduced only in the R reading line. That is, in the case of a cyan line,the line is read without level reduction in the G pixel and the B pixel,but the center of the line is read in the case of the R pixel of thereading line L1, and hence the R pixel is increased in level reduction.When the results are sorted into the R reading line, the G reading line,and the B reading line by the data sorting circuit 403, only the Rreading line can be confirmed as a line whose level is reduced acrossthree pixels due to the characteristic of the original reading unit 106.

As described above, even when the line in the original has a one-pixelwidth, the line is treated as having a three-pixel width due to thereading characteristic of the original reading unit 106 after sorting isperformed by the data sorting circuit 403. In contrast, dust adhering onthe original table glass has a one-pixel width in every reading line asshown in FIG. 9A and FIG. 9B after the pixels are sorted by the datasorting circuit 403. The dust detection circuit 406 utilizes such acharacteristic to detect dust that is not present in the image of theoriginal being an object, based on the state of the pixels having thesame color detected by the line sensor 203.

FIG. 13 is an internal block diagram of the dust detection circuit 406configured to perform the above-mentioned dust detection. The dustdetection circuit 406 includes an image data binarization circuit 1501,a histogram generation circuit 1502, a histogram data binarizationcircuit 1503, a one-pixel-width detection circuit 1504, and an imagedata delay circuit 1505. The image data binarization circuit 1501 isconfigured to compare the image data input from the shading correctioncircuit 405 with a predetermined threshold set by the CPU 401, tothereby binarize the image data having the threshold or less as “1” andother data as “0”. The data subjected to binarization is called“binarized data”. The histogram generation circuit 1502 is configured togenerate histogram data representing the distribution of the binarizeddata output from the image data binarization circuit 1501. The histogramdata is a distribution of sorted pixels. In the first embodiment, thehistogram data is an accumulative addition value obtained throughaddition for each reading line during reading of the original. Thishistogram data can be reset to “0” at any time by the CPU 401.

The histogram data binarization circuit 1503 is configured to set apixel position at which the accumulative addition value obtained by thehistogram generation circuit 1502 exceeds a setting value obtained fromthe CPU 401 to “1”, and a pixel position at which the accumulativeaddition value does not exceed the setting value to “0”, to therebyoutput the results as dust candidate flags. Only when a dust candidateflag representing a one-pixel width is present among the dust candidateflags output from the histogram data binarization circuit does theone-pixel-width detection circuit 1504 output the dust candidate flag asa dust flag to a subsequent-stage circuit. The image data delay circuit1505 is configured to delay the image data by the same width as thepixel width represented by the dust flag, to thereby output the delayedimage data to a subsequent-stage circuit together with information onthe relative position with respect to the dust flag. Although not shown,three image data delay circuits 1505 are prepared for the image data ofthe R reading line, the G reading line, and the B reading line inputfrom the shading correction circuit 405.

The example of the processing performed by the dust detection circuit406 at this time is specifically described. For example, it is assumedthat the result of reading the original is an image as illustrated inFIG. 14A in which a line caused by dust (black streak) and a linepresent in the original extend in the same direction. As describedabove, the line caused by dust has a one-pixel width, and the linepresent in the original has a three-pixel width. The relationshipbetween the accumulative addition value of the histogram generationcircuit 1502 and the threshold (dotted line) set by the CPU 401 in thiscase is shown in FIG. 14B. The histogram data binarization circuit 1503outputs dust candidate flags in which the pixel position in the mainscanning direction (main scanning position) that exceeds the thresholdis set as “1” and other pixel positions are set as “0” to theone-pixel-width detection circuit 1504 together with the information onthe position of each line. As a result, as shown in FIG. 14C, first, theshort line present in the original is eliminated from the dust candidateflags. Further, when the one-pixel-width detection circuit 1504 detectsa dust candidate flag representing a one-pixel width from the dustcandidate flags, the one-pixel-width detection circuit 1504 outputs itsposition as “1” to the subsequent-stage circuit, whereas when theone-pixel-width detection circuit 1504 detects a dust candidate flagrepresenting other pixel widths, the one-pixel-width detection circuit1504 outputs its positions as “0” to the subsequent-stage circuit. As aresult, as shown in FIG. 14D, the long line present in the original isalso eliminated from the dust candidate flags. That is, parts other thanthe part having a one-pixel width are all eliminated from the dustcandidate flags, and hence the line caused by dust (black streak) can bereliably confirmed regardless of the length of the line present in theoriginal. The dust detection circuit 406 detects the dust present on theoriginal table glass in this manner.

Further, at a time point at which the one-pixel-width detection circuit1504 detects any one dust flag representing the one-pixel width, theone-pixel-width detection circuit 1504 notifies the CPU 401 of this factwith an interruption signal. The accumulative addition value stored inthe histogram generation circuit 1502 is reset for each original by theCPU 401. That is, dust detection is possible for each original.

The dust correction circuit 407 determines the pixel at the positionrepresented by the dust flag output from the dust detection circuit 406as the pixel caused by dust, and uses a pixel adjacent to the pixel inthe same color to correct the pixel to have that color. For example, thepixel is corrected to have the color through linear interpolation ofpixels adjacent on the right and left. Examples of the reading level ofthe image data input to the dust correction circuit 407, the state ofthe dust flag, and the reading level of the image data after thecorrection are shown in FIG. 15. FIG. 15 is an example of the R readingline. The dust correction circuit 407 performs linear interpolationbased on the pixels adjacent on the right and left to the pixelspecified by the dust flag, and generates image data Ra whose readinglevel is recovered. The right adjacent pixel and the left adjacent pixelare both the R pixel, and hence it is easy to recover the reading level.Further, the abnormal pixel having a one-pixel width is subjected tolinear interpolation using pixels having the same color, and hence atrace of correction is less liable to remain.

The dust correction circuit 407 automatically performs theabove-mentioned correction processing each time the dust flag is inputfrom the dust detection circuit 406, to thereby output the image datasubjected to the correction to the subsequent-stage circuit.

The procedure of the processing performed by the CPU 401 when theoriginal is read in the image reading apparatus according to the firstembodiment is described with reference to FIG. 16. The CPU 401 monitorsthe operation portion 408, and waits until a reading start instructionis input from the user (Step S101: N). When the reading startinstruction is input (Step S101: Y), the CPU 401 drives the light source201 and the line sensor 203 for preparation before the reading (StepS102). Further, the CPU 401 sets the threshold for binarization withrespect to the dust detection circuit 406 (Step S103). Further, the CPU401 resets the accumulative addition value of the histogram generationcircuit 1502 of the dust detection circuit 406 (Step S104). Next, theCPU 401 drives the original conveyance motor 105 to start the conveyanceof the original (Step S105). When the original reading unit 106 has notfinished reading one original (Step S106: N), the CPU 401 monitorswhether or not an interruption signal is input from the dust detectioncircuit 406 (Step S107). When no interruption signal is input (StepS107: N), the CPU 401 returns the processing to Step S106. When theinterruption signal is input (Step S107: Y), the CPU 401 displays awarning message representing that dust is present on the original tableglass on the operation portion 408, to thereby urge the user to cleanthe original table glass (Step S108). After that, the CPU 401 returnsthe processing to Step S106. When the original reading unit 106 finishesreading one original (Step S106: Y), and the next original is present,the CPU 401 resets the histogram accumulative addition value of the dustdetection circuit 406, and returns the processing to Step S105, tothereby start reading of the next original. When there is no nextoriginal (Step S109: N), the CPU 401 ends the original reading operation(Step S109). The warning message displayed on the operation portion 408can be deleted through a press of a confirmation button displayed on theoperation portion 408. The user removes the dust adhering to theoriginal table glass, and then presses the confirmation button displayedon the operation portion 408.

As described above, according to the first embodiment, the influence ofdust can be set to a one-pixel width, which is a characteristic thatcannot be obtained from the image present in the original. Therefore,the line caused by the dust (black streak) can be accurately detectedwithout falsely detecting the line present in the original as dust. Withthis, it is possible to display a message for urging the user to cleanthe original table glass, or perform control such as image correctionbased on accurate information. Further, a plurality of reading means arenot required to be provided unlike for the related-art similarapparatus, and hence the apparatus also has an advantage in terms ofcost.

In the first embodiment, the image data of the original is read as anaggregate of a plurality of pixels in which adjacent pixels havedifferent colors in each of the main scanning direction and thesub-scanning direction, and the image data is stored in the line memory404 in association with the relationship of the relative position ofeach pixel. After that, the data sorting circuit 403 sorts pieces ofimage data of the original so that pixels having the same color areadjacent to each other and rows of same-color pixels are obtained.However, such sorting into the same color by the data sorting circuit403 is not necessarily required. The image data stored in the linememory 404 may be subjected to processing such as dust detection or dustcorrection by the CPU 401 without performing sorting into the image datahaving the same color.

Second Embodiment

In the first embodiment, description is made of an example in which theinfluence of dust is set to a one-pixel width to perform dust detection.However, the size and shape of the dust are uneven in many cases, and itis predicted that the dust cannot be accurately detected depending onthe position at which the dust adheres. Further, due to the lens or thelike, the dust may be imaged so as to be larger than the actual dust. Inview of those situations, in a second embodiment of the presentinvention, an example of an embodiment for detecting and correcting thedust more accurately is described.

FIG. 17 is an illustration of a state of dust that is imaged to have alarger size on the line sensor 203 due to the optical components or thelike in the image reading apparatus. In FIG. 17, x corresponds to theindividual positions of the light receiving elements in the line sensor203 similarly to FIG. 5A and FIG. 5B. That is, FIG. 17 is anillustration of a state in which dust is imaged at positions of x2(B),x3(R), and x4(G) in the reading line L1 of the line sensor 203. Positionx is 0 (reference position), and position x1 is a position (x+1) shiftedby a one-pixel width from x in the main scanning direction. Position x2is a position (x+2) shifted by a two-pixel width from x in the mainscanning direction. The same applies to position x3 and position x4.Suffix (B) means the B pixel, suffix (R) means the R pixel, and suffix(G) means the G pixel.

When dust is imaged to have a shape as illustrated in FIG. 17, the dustdetection circuit 406 of the first embodiment detects dust at positionsx2(B), x3(R), and x4(G) in the reading line L1. In actuality, edges ofthe dust may be imaged also at positions of x1(G) and x5(B) in thereading line L1. In FIG. 17, an imaged part at x1(G) in the reading lineL1 is referred to as a front edge of the dust, and an imaged part atx5(B) is referred to as a rear edge of the dust. In this case, the pixelat x1(G) in the reading line L1, at which the front edge of the dust isimaged, is less affected by the dust, and the difference in readinglevel from the surrounding G pixel does not apparently appear.Therefore, in the dust detection circuit 406 of the first embodiment,this dust may not be accurately detected. The same applies to x5(B) inthe reading line L1, at which the rear edge of the dust is imaged.However, dust tends to continuously adhere at the same position, and inthis case, conspicuous dust appears in an original image as a continuousstreak in the sub-scanning direction. In view of this, in the secondembodiment, when the distribution of the binarized data satisfies apredetermined condition, for example, when pixels adjacent in the mainscanning direction have no dust, the detected dust (abnormal pixel) isexpanded to the adjacent pixels in the same reading line. In the examplegiven above, the dust flag is expanded also to the pixels at x1(G) andx5(B).

The configuration of the image reading apparatus illustrated in FIG. 1,the configuration of the original reading unit 106 illustrated in FIG.2, and the configuration of the line sensor 203 illustrated in FIG. 3are similar to those of the first embodiment, and hence descriptionthereof is omitted herein. FIG. 18 is a block diagram of the controlsystem of the image reading apparatus according to the secondembodiment. Components described in the first embodiment are denoted bylike reference symbols. The second embodiment differs from the firstembodiment in that a flag expansion circuit 2401 and a line memory 2402are added to the dust detection circuit 406 as dust detection means.

The operations of the flag expansion circuit 2401 and the line memory2402 are described with reference to FIG. 19A to FIG. 19D. Asillustrated in FIG. 19A, dust flags sorted into respective colors of R,G, and B are input from the dust detection circuit 406 to the flagexpansion circuit 2401. In the example of FIG. 19A, the dust flags areallocated at positions of x2(B), x3(R), and x4(G). The flag expansioncircuit 2401 stores those dust flags in the line memory 2402 so that thedust flags are in the same arrangement as the line sensor 203. That is,as illustrated in FIG. 19B, the flag expansion circuit 2401 stores thedust flags in the line memory 2402 as x2(B), x3(R), and x4(G). Withthis, it is returned to a state in which the dust is imaged on the linesensor 203. Next, as illustrated in FIG. 19C, the flag expansion circuit2401 expands the dust flags stored in the line memory 2402 to pixelsadjacent on the right and left to the dust flags. That is, the flagexpansion circuit 2401 also allocates the dust flags to the pixels atx1(G) and x5(B). With this, the edges of the dust, which have beenundetectable by the dust detection circuit 406, can be subjected to thecorrection processing. After that, the flag expansion circuit 2401 sortsthe dust flags stored in the line memory 2402 illustrated in FIG. 19Cinto respective colors of R, G, and B as illustrated in FIG. 19D, andreads out the dust flags, to thereby transmit the dust flags to the dustcorrection circuit 407. The dust correction operation thereafter issimilar to that of the first embodiment, and hence description thereofis omitted herein.

With the above-mentioned processing, correction can be performed also onthe pixels at which the edges of the dust are imaged, which aredifficult to be detected by the dust detection circuit 406 of the firstembodiment. Further, as illustrated in FIG. 19D, the dust flags expandedin the second embodiment are independent dust flags each having aone-pixel width after being sorted into the respective colors of R, G,and B. Therefore, there is an advantage in that a trace of correction isless liable to remain even when the dust flags are expanded.

In the second embodiment, description is made of an example in which thedust flags are expanded to the pixels adjacent to the dust flags on theright and left, that is, in the main scanning direction, but the dustflags may be expanded to the pixels adjacent in the sub-scanningdirection or an oblique direction.

Third Embodiment

In the first embodiment, description is made of a method involvingarranging color filters 300 of R, G, and B on the line sensor 203 in astaggered manner so that the influence of the dust can be divided intoone pixel in each color. That is, only the image at the position atwhich a dust flag representing a one-pixel width is present among thedust candidate flags output from the histogram data binarization circuit1503 is set as a pixel to be corrected. However, the dust size varies,and hence it is considered that the dust may not always be dividable tohave a one-pixel width. This problem is described below.

FIG. 20A is an example of dust that can be divided into one pixel afterthe sorting into the respective colors of R, G, and B. Further, FIG. 20Bis an example of dust divided to have a two-pixel width after thesorting into the respective colors of R, G, and B. In FIG. 20A and FIG.20B, similarly to FIG. 5A and FIG. 5B, x represents a position of alight receiving element in the line sensor 203. In the example of FIG.20A, the dust is imaged at the positions of x2(B), x3(R), and x4(G) inthe reading line L1. In this case, after the sorting into the respectivecolors is performed in the procedure illustrated in FIG. 5A and FIG. 5B,the dust can be divided to have a one-pixel width in each color of R, G,and B. Meanwhile, in the example of FIG. 20B, the dust is imaged atpositions of x2(B), x3(R), and x4(G) in the reading line L1 andpositions of x2(G), x3(B), and x4(R) in the reading line L2. Therefore,after the sorting into the respective colors is performed in theprocedure illustrated in FIG. 5A and FIG. 5B, the dust is divided tohave one two-pixel width in the R reading line, two one-pixel widths inthe G reading line, and one two-pixel width in the B reading line. Thatis, when the dust adheres across a plurality of reading lines of theline sensor 203 as described above, the imaged dust has a two-pixelwidth or more even after the sorting into the same color is performed.

Further, in the first embodiment, description is made of an example inwhich correction is performed through linear interpolation with respectto the dust image having a one-pixel width based on pixels adjacentthereto for each color. However, in the case where the correction isperformed through linear interpolation for each color, when there isrelatively thick dust at an edge part or the like of the vertical lineof the original, an unnecessary color may appear instead throughcorrection. For example, as illustrated in FIG. 21, it is assumed thatan edge part of a black (achromatic) vertical line is subjected tolinear interpolation for each color. The original image has a blackvertical line at positions x to x2 in the main scanning direction, andhas a white vertical line at x3 to x5. The digital value after the A/Dconversion of the original image is “0” in all pixels of the respectivecolors of R, G, and B at the positions of x to x2 (black vertical line)and is “100” in all pixels of the respective colors of R, G, and B atthe positions of x3 to x5 (white part). As those numerical values arehigher, a brighter state is represented. In this case, when dust ispresent at positions of the R pixels of x1, x2, and x3, linearinterpolation is performed using the pixels at the positions of x andx4. Then, the corrected digital value of the R pixel becomes 25 at theposition of x1, 50 at the position of x2, and 75 at the position of x3,which are numerical values different from those of the G pixel and the Bpixel at the same position. Then, although the original image isachromatic, the original image becomes chromatic in the width of threepixels at x1 to x3 after the correction, and thus unnecessary coloringis caused. In FIG. 21, an example is given of a black achromaticvertical line, but, for example, even when an edge part of a coloredline is corrected, unnecessary coloring different from that of theoriginal image is caused.

In order to reduce this unnecessary coloring, when dust is present inany one of the colors of R, G, and B, it is conceivable to similarlyperform correction through linear interpolation also for other colors atthe same position in the main scanning direction. For example, FIG. 22is an example of a case where the edge part of the black (achromatic)vertical line is subjected to linear interpolation for all colors at thesame time. The original image and the dust position are the same asthose of FIG. 21. In FIG. 22, when the dust is present at the R pixelsat positions of x1, x2, and x3, the G pixels and the B pixels at thesame positions (x1, x2, and x3) in the main scanning direction are alsopixels to be corrected. In this manner linear interpolation is performedbased on the positions of x and x4 for all of the colors of R, G, and B.With this, the difference in numerical values of R, G, and B atpositions of x1, x2, and x3 after the interpolation is equal to thatbefore the correction, and hence unnecessary coloring is less liable tobe caused. However, when correction is performed similarly throughlinear interpolation also for other colors at the same position asillustrated in FIG. 22, the dust divided into one pixel of respectivecolors of R, G, and B through use of the staggered color filters 300 iscorrected based on the original dust width.

FIG. 23 is a schematic diagram for illustrating a case where pixels ofother colors at the same pixel positions as the dust images divided tohave a one-pixel width of the respective colors of R, G, and B are alsoset as the pixels to be corrected. When the dust is present at x2(B),x3(R), and x4(G), R and G at the position of x2, G and B at the positionof x3, and R and B at the position of x4 are also pixels to becorrected. When the pixels are viewed in each color, dust having athree-pixel width is obtained. Therefore, the pixel to be correctedbecomes thick, and a trace of correction is more liable to remain ascompared to a case where a pixel having a one-pixel width is corrected.

In view of this, in a third embodiment of the present invention, whenthe number of the pixels of the abnormal pixel (dust) satisfies apredetermined condition, for example, when a condition in which pixelscorresponding to dust continue for a predetermined number or more in themain scanning direction (first direction) is satisfied, all of theabnormal pixels are corrected to pixels having the same color. Further,when the pixels corresponding to the dust continue for less than thepredetermined number in the main scanning direction, correction isperformed through use of pixels adjacent to the pixel for the pixel ofeach color. With this, unnecessary coloring can be reduced even when thedust having a two-pixel width or more is set as the pixel to becorrected, and the correction can be performed without forming aconspicuous trace of correction. Now, specific configuration examplesfor enabling such correction are described. The configuration of theimage reading apparatus illustrated in FIG. 1, the configuration of theoriginal reading unit 106 illustrated in FIG. 2, and the configurationof the line sensor 203 illustrated in FIG. 3 are similar to those of thefirst embodiment, and hence description thereof is omitted herein.

FIG. 24 is a block diagram of the control system of the image readingapparatus according to the third embodiment. Components described in thefirst embodiment are denoted by like reference symbols. The thirdembodiment differs from the first embodiment in that a dust detectioncircuit 3001 and a flag synthesis circuit 3002 are provided as the dustdetection means instead of the dust detection circuit 406. Further, thethird embodiment differs from the first embodiment in that a dustcorrection circuit 3003 is provided as dust correction means instead ofthe dust correction circuit 407.

FIG. 25 is an internal block diagram of the dust detection circuit 3001of the image reading apparatus according to the third embodiment. Thedust detection circuit 3001 includes an image data binarization circuit3101, a histogram generation circuit 3102, and a histogram databinarization circuit 3103. The image data binarization circuit 3101 isconfigured to binarize the image data input from the shading correctioncircuit 405. That is, the image data binarization circuit 3101 isconfigured to set the image data that is equal to or less than apredetermined threshold, which is set by the CPU 401, to “1”, and setother image data to “0”. A different threshold can be set by the CPU 401for the image data binarization circuit 3101 depending on the pixelwidth.

The histogram generation circuit 3102 is configured to generatehistogram data by adding the binarized data output from the image databinarization circuit 3101 for each reading line during reading of theoriginal. The histogram data is generated based on the pixel width. Thehistogram data can be reset by the CPU 401 to “0” as appropriate. Thehistogram data binarization circuit 3103 is configured to output, as adust flag, a position at which the addition value of the histogramgeneration circuit 3102 exceeds a predetermined threshold set by the CPU401 as “1”, and output a position at which the addition value does notexceed the predetermined threshold as “0”.

FIG. 26A to FIG. 26J are diagrams for illustrating the concept of thedust detection processing performed by the dust detection circuit 3001.In this case, for simplifying the description, description is only madeof the R pixels, but the same applies to the G pixels and the B pixels.Further, for the sake of convenience, description is made of an examplein which the widths of the dust image are a one-pixel width and atwo-pixel width, but the third embodiment is also applicable to a dustimage having a width of three pixels or more. Similarly to FIG. 5A andFIG. 5B, x in FIG. 26A to FIG. 26J corresponds to the pixel position ofthe line sensor 203. Further, the reading lines L1, L2, L3 L16 in thevertical direction represent the reading results of the light receivingelement rows in the sub-scanning direction, which are read at differenttimes.

FIG. 26A is the image data (digital values) of each reading line. As thenumerical values become higher, the pixel becomes brighter, and as thenumerical values become lower, a possibility that the pixel is anabnormal pixel (dust) becomes higher. For example, the digital value ofthe pixel at the position x4 in the main scanning direction of thereading line L1 is “22”, and the possibility that the pixel is anabnormal pixel (dust) is high. FIG. 26B is an illustration of results ofdetermining, by the image data binarization circuit 3101, whether or notthe digital value of one pixel in the main scanning direction is equalto or less than a predetermined threshold. In this case, it is assumedthat the threshold for one pixel is set to “30”, and the pixels havingdigital values of “30” or less are displayed in a highlighted manner.FIG. 26C is an illustration of results of binarizing, by the image databinarization circuit 3101, the pixel whose digital value is “30” or lessas “1” and other pixels as “0”. FIG. 26D is an illustration of resultsof determining whether or not a value obtained by adding digital valuesof a width of two pixels adjacent to each other in the main scanningdirection is equal to or less than a predetermined threshold in thedigital values of the image data of FIG. 26A. The numerical value is anumerical value obtained by adding the digital values of a target pixeland a pixel adjacent to the target pixel on the right.

For example, the numerical value described at the position of x4 in thereading line L3 is “55”, which is obtained by adding “22” being thedigital value in the reading line L3 and “33” being the digital value atposition x5 of the pixel adjacent on the right. That is, the digitalvalue of the width of two pixels adjacent to each other in the mainscanning direction is described. In this case, the threshold of thetwo-pixel width is set to “50”, and the pixels having the added valuesthat are equal to or less than “50” are displayed in a highlightedmanner. FIG. 26E is results of binarizing, by the image databinarization circuit 3101, the pixel whose digital value of thetwo-pixel width is “50” or less as “1” and other pixels as “0”. Thebinarized data for the one-pixel width and the binarized data for thetwo-pixel width are transmitted to the histogram generation circuit 3102at the subsequent stage. The image data binarization circuit 3101 canperform the image data binarization processing in accordance with thepixel width in parallel.

FIG. 26F is histogram data for the one-pixel width, which is obtained byadding, by the histogram generation circuit 3102, binarized data for theone-pixel width illustrated in FIG. 26C in the sub-scanning direction.For example, at the position of x4, a total of 10 pixels in thesub-scanning direction are equal to or less than the threshold.Similarly, FIG. 26G is histogram data for the two-pixel width, which isobtained by adding, by the histogram generation circuit 3102, binarizeddata for the two-pixel width illustrated in FIG. 26E in the sub-scanningdirection. For example, at the position of x8, a total of 10 pixels inthe sub-scanning direction are equal to or less than the threshold. Thehistogram generation circuit 3102 transmits the histogram data for theone-pixel width and the histogram data for the two-pixel width to thehistogram data binarization circuit 3103 at the subsequent stage.

FIG. 26H is an illustration of results obtained by binarizing, by thehistogram data binarization circuit 3103, the histogram data for theone-pixel width illustrated in FIG. 26F. In this case, a threshold isset to “10” by the CPU 401, and the histogram data binarization circuit3103 generates histogram binarized data for the one-pixel width in whichthe position at which the histogram data is “10” or more is set as “1”and other positions are set as “0”. Similarly, FIG. 26I is anillustration of results obtained by binarizing, by the histogram databinarization circuit 3103, the histogram data for the two-pixel widthillustrated in FIG. 26G. In this case, the threshold is set to “10” bythe CPU 401, and the histogram data binarization circuit 3103 generateshistogram binarized data for the two-pixel width in which the positionat which the histogram data is “10” or more is set as “1” and otherpositions are set as “0”. In this case, the histogram data for thetwo-pixel width is binarized such that the pixel adjacent on the rightto the pixel being binarized as “1” is also “1”. For example, thehistogram data for the two-pixel width is binarized such that, when theposition of x8 illustrated in FIG. 26I is “1”, the position of x9 on theright is also “1”.

Finally, the histogram binarized data for the one-pixel width and thehistogram binarized data for the two-pixel width are added, and dustflags as illustrated in FIG. 26J are transmitted to the flag synthesiscircuit 3002 at the subsequent stage. The dust flags represent four rowsat x4, x8, x9, and x12 including dust at high possibility among thepieces of image data of 13 pixels in the main scanning direction and 16reading lines in the sub-scanning direction illustrated in FIG. 26A.

An image data delay circuit 3104 delays the input image data by the sameamount as the dust flag. A positional relationship between this imagedata and the dust flags output from the histogram data binarizationcircuit 3103 is output together to the subsequent-stage circuit.

Although not shown, three dust detection circuits 3001 illustrated inFIG. 25 are prepared for the image data of the R reading line, the Greading line, and the B reading line input from the shading correctioncircuit 405, and the three dust detection circuits 3001 operate inparallel. With this, abnormal pixels (dust) having the one-pixel widthand the two-pixel width in the R reading line, the G reading line, andthe B reading line can be detected.

In the third embodiment, the binarization threshold for the two-pixelwidth is set to a value lower than two times the threshold for theone-pixel width set to the image data binarization circuit 3101. In thismanner, adjustment is possible so that the dust having the one-pixelwidth can be more easily detected than the dust having the two-pixelwidth.

FIG. 27 is an internal block diagram of the flag synthesis circuit 3002.The image data, the dust flag R, the dust flag G, and the dust flag B,which are transmitted from the dust detection circuit 3001 at theprevious stage, are input to the flag synthesis circuit 3002. The dustflag R is input to a MAX_HOLD circuit R 3301. The dust flag G is inputto a MAX_HOLD circuit G 3302. The dust flag B is input to a MAX_HOLDcircuit B 3303. Further, the dust flag R, the dust flag G, and the dustflag B are simultaneously input also to a flag OR circuit 3304. The flagOR circuit 3304 is configured to subject the input dust flag R, dustflag G, and dust flag B to logical OR operation at each pixel positionin the main scanning direction, to thereby output a dust flag subjectedto the logical OR operation. Such a dust flag is called “OR flag”. TheOR flag is transmitted to a flag determination circuit 3305 at thesubsequent stage and to the MAX_HOLD circuits 3301, 3302, and 3303 ofthe respective colors.

The MAX_HOLD circuits 3301, 3302, and 3303 of the respective colors areconfigured to acquire maximum-width information (MAX_R, MAX_G, andMAX_B) of the dust flags of the respective colors input in a period inwhich the OR flag is input. Further, the MAX_HOLD circuits 3301, 3302,and 3303 are configured to transmit the maximum-width informationtogether with the input dust flags of the respective colors to the flagdetermination circuit 3305 at the subsequent stage. The flagdetermination circuit 3305 is configured to compare the maximum-widthinformation (MAX_R, MAX_G, and MAX_B) transmitted from the MAX_HOLDcircuits 3301, 3302, and 3303 of the respective colors with a flagdetermination threshold set by the CPU 401. Further, the flagdetermination circuit 3305 is configured to determine whether the dustflags of the respective colors are directly output or replaced with theOR flag to be output based on the flag determination threshold.

FIG. 28A and FIG. 28B are time charts for illustrating the operations ofthe flag synthesis circuit 3002. FIG. 28A is an example in which onlythe flag representing the one-pixel width is input. The dust flag R, thedust flag G, and the dust flag B of FIG. 28A represent dust flags of therespective colors to be input to the MAX_HOLD circuits 3301, 3302, and3303 corresponding to the above-mentioned respective colors and to theflag OR circuit 3304. Further, the OR flag represents the OR flag to beoutput from the flag OR circuit 3304. In FIG. 28A and FIG. 28B, xrepresents the position of the individual light receiving elements ofthe line sensor 203. Respective flags are input in the order of flagshaving smaller x to the MAX_HOLD circuits 3301, 3302, and 3303 of therespective colors and to the flag OR circuit 3304. That is, x isequivalent to time, and can be replaced with time.

Referring to FIG. 28A, the dust flag B at the main scanning position xis input to the MAX_HOLD circuit B 3302 and the flag OR circuit 3304.The flag OR circuit 3304 subjects the dust flags of the respectivecolors to logical OR operation. Therefore, the OR flag is at a “High”level, and is output to the MAX_HOLD circuits 3301, 3302, and 3303 ofthe respective colors. The MAX_HOLD circuits 3301, 3302, and 3303 of therespective colors store the maximum widths of the input dust flags ofthe respective colors from the timing at which the above-mentioned ORflag is input. For example, at the timing at which the dust flag at theposition of x5 is input, the R maximum value (R_MAX), the G maximumvalue (G_MAX), and the B maximum value (B_MAX) are all stored as “1”.When the output of the OR flag is ended at the position of x6 at whichthere is no output of dust flags of all colors, the MAX_HOLD circuits3301, 3302, and 3303 of the respective colors output the maximum widthsof the dust flags of the respective colors at this time point to theflag determination circuit 3305 at the subsequent stage. After that, theMAX_HOLD circuits 3301, 3302, and 3303 of the respective colors resetthe information on the maximum width stored as described above to “0” atthe timing at which the next OR flag is input.

FIG. 28B is an operation example of a case where a flag representing atwo-pixel width is input. In the example of FIG. 28B, at the timing ofx6 at which the input of the OR flag is ended, the MAX_HOLD circuits3301, 3302, and 3303 of the respective colors store the maximum widthsof the respective colors at the time point. That is, the R maximum value(R_MAX), the G maximum value (G_MAX), and the B maximum value (B_MAX)are stored as “1”, “2”, and “1”, respectively, and those values areoutput to the flag determination circuit 3305 at the subsequent stage.

Next, the flag determination circuit 3305 is described. The flagdetermination circuit 3305 is configured to store the dust flag of eachcolor, the OR flag, and the maximum width of each color for one readingline. The dust flag corresponds to the dust flag R, the dust flag G, andthe dust flag B output from the MAX_HOLD circuits 3301, 3302, and 3303of the respective colors. The OR flag corresponds to the flag outputfrom the flag OR circuit 3304. The maximum width of each colorcorresponds to the corresponding R maximum width (R_MAX), G maximumwidth (G_MAX), or B maximum width (B_MAX).

FIG. 29 is an illustration of the operation timing of the flagdetermination circuit 3305. The dust flags for 16 pixels at x to x15 areillustrated in the main scanning direction. The dust flag R, the dustflag G, the dust flag B, the OR flag, R_MAX, G_MAX, and B_MAX are each aflag for one reading line, which is stored in a memory (not shown) inthe flag determination circuit 3305. The flag determination circuit 3305performs flag determination based on those flags and on a flagdetermination threshold set by the CPU 401, to thereby perform anoperation of replacing the flag when the value is equal to or more thanthe flag determination threshold (when a predetermined condition issatisfied). A dust flag Ra, a dust flag Ga, and a dust flag Ba are dustflags of the respective colors obtained after the replacement.

For example, it is assumed that the flag determination threshold is setto “2”. That is, when any one of R_MAX, G_MAX, and B_MAX is “2” or more,the flag determination circuit 3305 replaces the flag of each color ofR, G, and B at the corresponding position with the OR flag. Meanwhile,when all of R_MAX, G_MAX, and B_MAX are “1” or less, the flagdetermination circuit 3305 directly allocates the input dust flag R,dust flag G, and dust flag B. In the example of FIG. 29, the originaldust flag R, dust flag G, and dust flag B are directly allocated atpositions of x to x5, and the flags are replaced with the OR flag at thepositions of x9 to x15. After that, the flag determination circuit 3305transmits the dust flag Ra, the dust flag Ga, and the dust flag Baobtained after the replacement to the dust correction circuit 3003 atthe subsequent stage.

An image data delay circuit 3306 delays the image data by the sameamount as the dust flag. A positional relationship between this imagedata and the dust flags is output together to the subsequent-stagecircuit. The dust correction circuit 3003 determines that the dust ispresent at the position of the dust flag (dust flag Ra, dust flag Ga, ordust flag Ba) transmitted from the flag synthesis circuit 3002, andcorrects the pixel at the position through linear interpolation based onpixels adjacent to the position on the right and left.

In this manner, according to the image reading apparatus of the thirdembodiment, when the linear interpolation is performed through the useof adjacent pixels, a part to which thick dust adheres, which is liableto cause coloring, can be corrected for all colors in common, and a partto which thin dust adheres, which is less liable to cause coloring, canbe corrected for each color. With this, correction can be performedwhile reducing unnecessary coloring and without forming a conspicuoustrace of correction.

As described above, the abnormal pixel can be detected with highaccuracy, and false detection of the abnormal image can be effectivelysuppressed. In the above-mentioned embodiments, description is made withreference to the electrophotographic image forming apparatus, but thepresent invention may be applied to, for example, an ink-jet printerconfigured to eject ink to form an image on a sheet.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2016-096752, filed May 13, 2016 which is hereby incorporated byreference herein in its entirety.

1.-13. (canceled)
 14. An image reading apparatus comprising: a stackingunit on which a document is stacked; a conveyance unit configured toconvey the original stacked on the stacking unit in a conveyingdirection; a first line sensor having a first light receiving elementreceiving light of a first color, a second light receiving elementreceiving light of a second color that is different from the firstcolor, and a third light receiving element receiving light of a thirdcolor that is different from both the first color and the second colorbeing arranged in a first direction; a second line sensor having afourth light receiving element receiving light of the first color, afifth light receiving element receiving light of the second color, and asixth light receiving element receiving light of the third color beingarranged in the first direction; a third line sensor having a seventhlight receiving element receiving light of the first color, an eighthlight receiving element receiving light of the second color, and a ninthlight receiving element receiving light of the third color beingarranged in the first direction, wherein the first line sensor, thesecond line sensor, and the third line sensor are arranged at apredetermined interval in a second direction, which is orthogonal to thefirst direction, corresponding to the conveyance direction; a readingunit configured to read, using the first line sensor, the second linesensor, and the third line sensor, an image on a document conveyed bythe conveyance unit to generate pixel data, which is data of pixelrepresenting an image corresponding to a reading result of the readingunit; a storage unit configured to store the pixel data; one or moreprocessors, at least one of the one or more processors operating to:generate, based on the pixel data stored in the storage unit, a pixeldata row of the first color, a pixel data row of the second color, and apixel data row of the third color; determine an abnormal pixel in thefirst color based on the pixel data row of the first color; determine anabnormal pixel in the second color based on the pixel data row of thesecond color; and determine an abnormal pixel in the third color basedon the pixel data row of the third color; wherein, in the first linesensor, the first light receiving element is arranged at the firstreading position in the main scanning direction in the first direction,the second light receiving element arranged at the second readingposition in the main scanning direction in the first direction isadjacent to the first light receiving element at one side of the firstlight receiving element in the first direction, and the third lightreceiving element arranged at the third reading position in the mainscanning direction in the first direction is adjacent to the secondlight receiving element at one side of the second light receivingelement in the first direction, wherein, in the second line sensor, thesixth light receiving element is arranged at the first reading positionin the main scanning direction in the first direction, and, in the thirdline sensor, the eighth light receiving element is arranged at the firstreading position in the main scanning direction in the first direction;wherein, in the second line sensor, the fourth light receiving elementis arranged at the second reading position in the main scanningdirection in the first direction, and, in the third line sensor, theninth light receiving element is arranged at the second reading positionin the main scanning direction in the first direction; wherein, in thesecond line sensor, the fifth light receiving element is arranged at thethird reading position in the main scanning direction in the firstdirection, and, in the third line sensor, the seventh light receivingelement is arranged at the third reading position in the main scanningdirection in the first direction; wherein the at least one of the one ormore processors is configured to: generate the pixel data row of thefirst color concerning the image of the first position on the documentin the conveyance direction, based on pixel data corresponding to thefirst light receiving element, pixel data corresponding to the fourthlight receiving element, and pixel data corresponding to the seventhlight receiving element, which is pixel data, among image data stored inthe storage unit, of the first color image concerning an image of afirst position on the document in the conveyance direction; generate thepixel data row of the second color concerning the image of the firstposition on the document in the conveyance direction, based on pixeldata corresponding to the second light receiving element, pixel datacorresponding to the fifth light receiving element, and pixel datacorresponding to the eighth light receiving element, which is pixeldata, among image data stored in the storage unit, of the second colorimage concerning an image of a first position on the document in theconveyance direction; and generate the pixel data row of the third colorconcerning the image of the first position on the document in theconveyance direction, based on pixel data corresponding to the thirdlight receiving element, pixel data corresponding to the sixth lightreceiving element, and pixel data corresponding to the ninth lightreceiving element, which is pixel data, among image data stored in thestorage unit, of the third color image concerning an image of a firstposition on the document in the conveyance direction.
 15. The imagereading apparatus according to claim 14, comprising a correcting unitconfigured to, in the image corresponding to the reading result of thereading unit: correct pixel data of a first pixel, which is a pixel ofthe first color, determined to be the abnormal image based on pixel dataof the pixel of the first color which is adjacent to the first pixel ina direction corresponding to the first direction, correct pixel data ofa second pixel, which is a pixel of the second color, determined to bethe abnormal image based on pixel data of the pixel of the second colorwhich is adjacent to the second pixel in a direction corresponding tothe first direction, and correct pixel data of a third pixel, which is apixel of the third color, determined to be the abnormal image based onpixel data of the pixel of the third color which is adjacent to thethird pixel in a direction corresponding to the first direction.
 16. Theimage reading apparatus according to claim 14, wherein the image data,wherein the image data is data representing intensity of light receivedby the light receiving element of the first line sensor, the second linesensor, or the third line sensor.
 17. The image reading apparatusaccording to claim 14, wherein the first color is red, the second coloris green, and the third color is blue.
 18. The image forming apparatuscomprising: an image reading apparatus; and an image forming unitconfigured to form an image on a predetermined recording medium based onthe image information read by the image reading apparatus, wherein theimage reading apparatus includes: a stacking unit on which a document isstacked; a conveyance unit configured to convey the original stacked onthe stacking unit in a conveying direction; a first line sensor having afirst light receiving element receiving light of a first color, a secondlight receiving element receiving light of a second color that isdifferent from the first color, and a third light receiving elementreceiving light of a third color that is different from both the firstcolor and the second color being arranged in a first direction; a secondline sensor having a fourth light receiving element receiving light ofthe first color, a fifth light receiving element receiving light of thesecond color, and a sixth light receiving element receiving light of thethird color being arranged in the first direction; a third line sensorhaving a seventh light receiving element receiving light of the firstcolor, an eighth light receiving element receiving light of the secondcolor, and a ninth light receiving element receiving light of the thirdcolor being arranged in the first direction, wherein the first linesensor, the second line sensor, and the third line sensor are arrangedat a predetermined interval in a second direction, which is orthogonalto the first direction, corresponding to the conveyance direction; areading unit configured to read, using the first line sensor, the secondline sensor, and the third line sensor, an image on a document conveyedby the conveyance unit to generate pixel data, which is data of pixelrepresenting an image corresponding to a reading result of the readingunit; a storage unit configured to store the pixel data; one or moreprocessors, at least one of the one or more processors operating to:generate, based on the pixel data stored in the storage unit, a pixeldata row of the first color, a pixel data row of the second color, and apixel data row of the third color; determine an abnormal pixel in thefirst color based on the pixel data row of the first color; determine anabnormal pixel in the second color based on the pixel data row of thesecond color; and determine an abnormal pixel in the third color basedon the pixel data row of the third color; wherein, in the first linesensor, the first light receiving element is arranged at the firstreading position in the main scanning direction in the first direction,the second light receiving element arranged at the second readingposition in the main scanning direction in the first direction isadjacent to the first light receiving element at one side of the firstlight receiving element in the first direction, and the third lightreceiving element arranged at the third reading position in the mainscanning direction in the first direction is adjacent to the secondlight receiving element at one side of the second light receivingelement in the first direction, wherein, in the second line sensor, thesixth light receiving element is arranged at the first reading positionin the main scanning direction in the first direction, and, in the thirdline sensor, the eighth light receiving element is arranged at the firstreading position in the main scanning direction in the first direction;wherein, in the second line sensor, the fourth light receiving elementis arranged at the second reading position in the main scanningdirection in the first direction, and, in the third line sensor, theninth light receiving element is arranged at the second reading positionin the main scanning direction in the first direction; wherein, in thesecond line sensor, the fifth light receiving element is arranged at thethird reading position in the main scanning direction in the firstdirection, and, in the third line sensor, the seventh light receivingelement is arranged at the third reading position in the main scanningdirection in the first direction; wherein the at least one of the one ormore processors is configured to: generate the pixel data row of thefirst color concerning the image of the first position on the documentin the conveyance direction, based on pixel data corresponding to thefirst light receiving element, pixel data corresponding to the fourthlight receiving element, and pixel data corresponding to the seventhlight receiving element, which is pixel data, among image data stored inthe storage unit, of the first color image concerning an image of afirst position on the document in the conveyance direction; generate thepixel data row of the second color concerning the image of the firstposition on the document in the conveyance direction, based on pixeldata corresponding to the second light receiving element, pixel datacorresponding to the fifth light receiving element, and pixel datacorresponding to the eighth light receiving element, which is pixeldata, among image data stored in the storage unit, of the second colorimage concerning an image of a first position on the document in theconveyance direction; and generate the pixel data row of the third colorconcerning the image of the first position on the document in theconveyance direction, based on pixel data corresponding to the thirdlight receiving element, pixel data corresponding to the sixth lightreceiving element, and pixel data corresponding to the ninth lightreceiving element, which is pixel data, among image data stored in thestorage unit, of the third color image concerning an image of a firstposition on the document in the conveyance direction.